<?php
/**
 * Projects.php 
 * 
 * Template Name: Projects
 */
get_header();
?>
		<?php include(TEMPLATEPATH . '/filter_projects.php'); ?>

		<?php 
			$pageNum = (get_query_var('paged')) ? get_query_var('paged') : 1;
			query_posts("category_name=projects"."&orderby=title&order=asc&paged=$pageNum&posts_per_page=20"); 
		?>
		<?php if(have_posts()): ?>
			<?php while(have_posts()) : the_post(); ?>
		
				<?php include(TEMPLATEPATH . '/post.php'); ?>
	
			<?php endwhile; ?>
			
			<div class="pagination tier">
				<div class="xMain column">	
					<span class="prev"><?php previous_posts_link('Previous Page'); ?></span>
					<span class="next"><?php next_posts_link('Next Page'); ?></span>	
				</div>	
			</div>
			
		<?php else: ?>
	
		<?php endif; ?>
		<?php wp_reset_query(); ?>		
	
		<?php get_footer(); ?>